import request from '@/utils/request'

// 创建ocr结果
export function createResult(data) {
  return request({
    url: '/ocr/result/create',
    method: 'post',
    data: data
  })
}

// 更新ocr结果
export function updateResult(data) {
  return request({
    url: '/ocr/result/update',
    method: 'put',
    data: data
  })
}

// 删除ocr结果
export function deleteResult(id) {
  return request({
    url: '/ocr/result/delete?id=' + id,
    method: 'delete'
  })
}

// 获得ocr结果
export function getResult(id) {
  return request({
    url: '/ocr/result/get?id=' + id,
    method: 'get'
  })
}

// 获得ocr结果分页
export function getResultPage(params) {
  return request({
    url: '/ocr/result/page',
    method: 'get',
    params
  })
}
// 导出ocr结果 Excel
export function exportResultExcel(params) {
  return request({
    url: '/ocr/result/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}